Shader "Custom/shader1" {
	Properties {
		_Color("color",color) = (1,1,1,1)
	}
	SubShader {
		Tags { "RenderType"="Opaque" }
		LOD 200
		Pass{
		CGPROGRAM
		#include "UnityCG.cginc"
		#pragma vertex vert
		#pragma fragment frag
		
		float4 _Color;
		
		struct v2f{
			float4 pos:POSITION;
			float4 color:TEXCOORD;
		};
		
		v2f vert(appdata_base i){
			v2f v;
			v.pos = mul(UNITY_MATRIX_MVP,i.vertex);
			v.color = _Color * (i.vertex.z);
			return v;
		}
		
		float4 frag(v2f i):COLOR{
			return i.color;
		}
		
		ENDCG
		}
	} 
	FallBack "Diffuse"
}
